package com.linln.modules.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 考勤信息对象
 */
@Data
@TableName("biz_attendance")
public class Attendance {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @TableField("type")
    private Integer type;
    @TableField("user_id")
    private Long userId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("record_time")
    private Date recordTime;


    /***辅助字段***/
    @TableField(exist = false)
    private Date startTime;
    @TableField(exist = false)
    private Date endTime;

    /**
     * 打卡人姓名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 是否迟到
     */
    @TableField("late")
    private Integer late;
}
